package com.itheima.social.securitys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.social.securitys.pojo.UserSocialSecurity;
import com.itheima.social.securitys.pojo.vo.User;
import com.itheima.social.securitys.pojo.vo.UserPersonalSocial;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * @author qiankaofei
 * @version 1.0
 * @date 2020/12/7 21:12
 */
public interface UserSocialMapper extends BaseMapper<UserSocialSecurity> {
    /**
     * 查询企业员工的社保信息列表
     */
    List<UserPersonalSocial> findByPage(@Param("companyId") String companyId);

    /**
     * 根据用户id查询用户信息
     */
    User findUserPersonalByUserId(@Param("userId") String userId);

    /**
     * 根据companyId,部门id查询，部门名称
     */
    String findDepartmentNameByCompanyIdAndDepartmentId(@Param("companyId") String companyId, @Param("departmentId") String departmentId,@Param("departmentName") String departmentName);
}
